<template>
  <div>
    <!-- 可以获取下拉框中的label值 -->
    <child v-model="value" v-model:label="label" :options="options"></child>
    {{ value }}
    {{ label }}
  </div>
</template>

<script setup>
import child from "./child.vue";
import { ref } from "vue";
const value = ref("");
const label = ref("");
const options = ref([
  {
    value: "Option1",
    label: "label1",
  },
  {
    value: "Option2",
    label: "label2",
  },
  {
    value: "Option3",
    label: "label3",
  },
]);
</script>

<style scoped></style>
